import { ref } from 'vue'
import PageContent from '@/components/page-content'

export function usePageContent() {
  //1:绑定列表ref
  const pageContentRef = ref<InstanceType<typeof PageContent>>()

  //2:搜索事件
  const handleSearch = (data: any) => {
    console.log('开始搜索', data)
    pageContentRef.value?.getPageData(data)
  }

  return [pageContentRef, handleSearch]
}
